kfraser@localhost.localdomain [Thu, 24 May 2007 14:21:29 +0000 (15:21 +0100)]
xend: Fix for removing devices at save/destroy domain.
The function XendDomainInfo:_releaseDevices() is called during the
save/destroy phase of a domain. It made some attempt to clean up the
devices, but wasn't complete, leaving dangling devices in the
xenstore. Not a big problem with normal use of Xen, but a buildup over
a large number of save/destroy instances, it would make the xenstore
database grow quite large, which in turn meant swap-thrashing in Dom0.
This patch makes use of the destroyDevices() function in
XendDomainInfo. This function needed some re-writing to make it work
correctly - I think it had some old code (not sure how old, as xm
annotate says that it's changeset 12071, but that, I think, is when it
was split out from XendDomain.py, rather than when it was created).
I have tested this over a few hundred save/restore cycles [two domains
constantly saved/restored with a short sleep to let them process some
work] combined with a loop of "xenstore-ls|wc". The output of the
latter is pretty much constant (it obviously varies a bit depending on
when in the save/restore cycle it hits). Previously, it would increase
by some 10 lines or so per save/restore cycle.
Signed-off-by: Mats Petersson <mats.petersson@amd.com>
kfraser@localhost.localdomain [Thu, 24 May 2007 14:13:13 +0000 (15:13 +0100)]
linux/x86: consolidate pte_val/p[mug]d_val replacements
- replace incomplete pXX_val_ma() set with complete __pXX_val() set
- use __pXX_val() instead of pXX_val() when only flags are accessed or
the frame number is only compared against zero
Signed-off-by: Jan Beulich <jbeulich@novell.com>
kfraser@localhost.localdomain [Thu, 24 May 2007 14:12:31 +0000 (15:12 +0100)]
linux/x86-64: force _PAGE_NX on the 1:1 mapping (matching native)
Signed-off-by: Jan Beulich <jbeulich@novell.com>
kfraser@localhost.localdomain [Thu, 24 May 2007 13:07:40 +0000 (14:07 +0100)]
blktap: Fix compile errors
When compiling the various blktap drivers with warnings cranked up, I
get errors that return values are not checked.
Signed-off-by: Charles Coffing <ccoffing@novell.com>
kfraser@localhost.localdomain [Thu, 24 May 2007 13:05:58 +0000 (14:05 +0100)]
xend: Tear down domain if device hotplug fails during startup
If creating an unmanaged guest (eg xm create), if device hotplug fails
during the startup of the guest, then the guest will be torn down
again. If creating and starting a managed guest (eg xm new && xm
start), then if device hotplug fails, the still born guest gets left
in 'paused' state. This confuses users no end, who go an unpause and
then get all upset when it shortly crashes (due to lack of disk or
network devices).
The attached patch fixes XenDomain.py's domain_start() method so that
if waitForDevices() fails, then the entire domain is torn down. This
is the same approach used in xm create.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
kfraser@localhost.localdomain [Thu, 24 May 2007 13:02:09 +0000 (14:02 +0100)]
xend: Fix CPU affinity reset across save/restore.
Fixes bug #936.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
kfraser@localhost.localdomain [Thu, 24 May 2007 12:58:01 +0000 (13:58 +0100)]
Console daemon - remove duplicate include.
Signed-off-by: Mats Petersson <mats.petersson@amd.com>
kfraser@localhost.localdomain [Thu, 24 May 2007 12:56:58 +0000 (13:56 +0100)]
svm: Replace call to svm_load_cr2 with conditional call to svm_trace_vmentry
Remove the call to svm_load_cr2 (which doesn't do anything useful).
The old svm_load_cr2 is now replaced with a svm_trace_vmentry. A call
to this function is done if "tb_init_done" is non-zero, so we don't call
this unless it's actually being used.
Signed-off-by: Mats Petersson <mats.petersson@amd.com>
kfraser@localhost.localdomain [Thu, 24 May 2007 12:45:47 +0000 (13:45 +0100)]
xend: Fix scheduler parameters of rebooted domain
When I changed the scheduler parameters of a domain with
xm sched-credit, the information of xm sched-credit was changed.
But as for the information of xm list, the values of the domain
configuration definition were kept.
And, then I rebooted the domain. The information of xm list was
not changed. But as for the information of xm sched-credit, the
values of the domain configuration definition were returned.
# xm create /xen/PVdomain.1 cpu_cap=150 cpu_weight=512
Using config file "/xen/PVdomain.1".
Started domain PVdomain.1
# xm sched-credit -d PVdomain.1
Name ID Weight Cap
PVdomain.1 1 512 150
# xm sched-credit -d PVdomain.1 -c 75 -w 384
# xm sched-credit -d PVdomain.1
Name ID Weight Cap
PVdomain.1 1 384 75
# xm list --long PVdomain.1 | grep cpu_
(cpu_weight 512)
(cpu_cap 150)
(cpu_time 29.
353831745)
# xm reboot PVdomain.1
# xm sched-credit -d PVdomain.1
Name ID Weight Cap
PVdomain.1 2 512 150
# xm list --long PVdomain.1 | grep cpu_
(cpu_weight 512)
(cpu_cap 150)
(cpu_time 5.
950247186)
If the scheduler parameters of the domain were changed with
xm sched-credit, I think that xm list should show the current
values about the scheduler parameters.
And, then if the domain is rebooted, I think that the rebooted
domain should keep the preceding values about the scheduler
parameters.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
kfraser@localhost.localdomain [Thu, 24 May 2007 12:42:41 +0000 (13:42 +0100)]
vmxassist: Fix some copy-and-paste mistakes in vmx_check_descriptor()
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
kfraser@localhost.localdomain [Thu, 24 May 2007 12:42:16 +0000 (13:42 +0100)]
Cleanups to map_vcpu_info.
Signed-off-by: Keir Fraser <keir@xensource.com>
kfraser@localhost.localdomain [Thu, 24 May 2007 12:34:19 +0000 (13:34 +0100)]
vnc: Fix Zenkaku_Hankaku and add deadkey keysyms
Signed-off-by: Pat Campbell <plc@novell.com>
Jeremy Fitzhardinge [Thu, 24 May 2007 12:32:03 +0000 (13:32 +0100)]
merged
kfraser@localhost.localdomain [Thu, 24 May 2007 12:30:29 +0000 (13:30 +0100)]
svm: Handle MC4_MISC threshold register for guests
The threshold register has been introduced in AMD RevF CPUs along with
SVM (Actually this MCA/MCE msr register existed before, but had no
meaning). Therefore no need for additional cpuid checks.
On read access it reports the HVM guest the register has been locked
by the BIOS. This means, it is not available for OS use. Thus, write
accesses are simply ignored. This behaviour actually matches real HW,
so guests can deal with this.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Jeremy Fitzhardinge [Thu, 24 May 2007 12:25:05 +0000 (13:25 +0100)]
Unmap vcpu_info mapping in arch_domain_destroy.
We don't need to touch it in arch_vcpu_reset() because that's only used
to recover from a failed suspend, and the correct behaviour there is to
leave the mapping as-is.
kfraser@localhost.localdomain [Thu, 24 May 2007 10:33:39 +0000 (11:33 +0100)]
Clean up map_domain_page().
Signed-off-by: Keir Fraser <keir@xensource.com>
kfraser@localhost.localdomain [Thu, 24 May 2007 09:50:07 +0000 (10:50 +0100)]
blktap: Add one more error reason statement to blktapctrl
blktapctrl already prints out exits reasons for all goto's to
open_failed except of not finding a device number for blktap0
This patch adds just that message so the user will get more info than
just "Unable to start blktapctrl"
Common source of this issue is that blktap is missing/failed to
load/...
Signed-off-by: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
Jeremy Fitzhardinge [Thu, 24 May 2007 09:48:58 +0000 (10:48 +0100)]
merged
Jeremy Fitzhardinge [Thu, 24 May 2007 09:47:27 +0000 (10:47 +0100)]
Implement VCPUOP_register_vcpu_info
This change implements the VCPUOP_register_vcpu_info vcpu_op. This
allows a guest to choose where each VCPU's vcpu_info structure is
placed within its address space, allowing it to put it somewhere which
is easily accessible via some per-cpu data access mechanism.
When changing the mapping of the vcpu info, there's no obvious way to
prevent the other vcpus from getting a stale pointer of the vcpu_info,
which could result in them accessing bad memory (stale pointers to the
shared_info page are not a problem, because its always valid). To
avoid this, we prevent guests from changing the vcpu_info location
more than once, since there's no obvious need to allow them to do this
at this point.
(If we really want to allow guests to update the vcpu_info location
more than once, then some sort of RCU wait between updating the
pointer and performing the unmap may be the way to do it.)
Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
kfraser@localhost.localdomain [Thu, 24 May 2007 09:46:57 +0000 (10:46 +0100)]
linux: Fix mem= kernel parameter when it is smaller than initial memory allocation.
From: Chris Lalancette <clalance@redhat.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
Jeremy Fitzhardinge [Thu, 24 May 2007 09:45:03 +0000 (10:45 +0100)]
Make map_domain_page_global fail
When the global mapping cache runs out, make map_domain_page_global
return NULL on failure rather than fire an assertion failure. This
also updates the callers to handle the error gracefully.
The only exception to this is the shadow pagetable code, which uses
map_domain_page_global to create a mapping for
v->arch.paging.shadow.guest_vtable; it's not clear this needs to be a
global mapping anyway.
Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
kfraser@localhost.localdomain [Thu, 24 May 2007 09:44:01 +0000 (10:44 +0100)]
blktap: Do not install libs or headers with execute permissions.
rpmlint complains that various blktap files are installed with
unnecessary execute permissions:
E: xen-devel spurious-executable-perm (Badness: 100)
/usr/lib64/libblktap.a
E: xen-devel spurious-executable-perm (Badness: 100)
/usr/include/blktaplib.h
Signed-off-by: Charles Coffing <ccoffing@novell.com>
kfraser@localhost.localdomain [Thu, 24 May 2007 09:39:28 +0000 (10:39 +0100)]
x86: Prevent an infinite series of traps
In some cases, we can end up in a vicious cycle of fatal_trap()s
within fatal_trap()s. Panic after a certain number of attempts.
Signed-off-by: Nils Nieuwejaar <nils.nieuwejaar@sun.com>
Use a per-cpu depth variable.
Signed-off-by: Keir Fraser <keir@xensource.com>
kfraser@localhost.localdomain [Thu, 24 May 2007 09:18:55 +0000 (10:18 +0100)]
[ACM] Simpler interface to hypercalls
Implement a simpler interface for the hypercalls to ACM. I put the
parameters to all hypercalls into a union. On top of this I have
implemented a shim layer for enabling ACM hypercalls on PPC.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
kfraser@localhost.localdomain [Thu, 24 May 2007 09:14:05 +0000 (10:14 +0100)]
blktap: Small changes to blktap + add a hook to clear ptes on implicit release of VMAs.
* free memory on release
* invalidate p2m entry when unmapping grants
* check for alloc failure of idx_map
* add DONTCOPY vma flag
* hook for clearing ptes when a vma is freed by the kernel
From: Geoffrey Lefebvre <geoffrey@cs.ubc.ca>
Signed-off-by: Keir Fraser <keir@xensource.com>
kfraser@localhost.localdomain [Thu, 24 May 2007 08:54:03 +0000 (09:54 +0100)]
ia64: nvram setup.
From: "Zhang, Xing Z" <xing.z.zhang@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
Ian Campbell [Thu, 24 May 2007 08:15:58 +0000 (09:15 +0100)]
merge
Ian Campbell [Thu, 24 May 2007 08:14:43 +0000 (09:14 +0100)]
LINUX/x86_64: Ensure that the initial page tables allow userspace
mappings of the vsyscall page. This matches native behaviour by
setting the U bit on the L2-L4 page table entries and controlling
access using the L1 entries.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
kfraser@localhost.localdomain [Thu, 24 May 2007 08:10:43 +0000 (09:10 +0100)]
Steven Hand [Tue, 22 May 2007 14:32:50 +0000 (15:32 +0100)]
This patch fixes the issue with waiting for devices to disconnect during the end
stage of migration in Xend. The problem was cause by a deletion of the VM domain
ID which is used by testDevicecompleComplete ->deviceIDs->backendRoot() to get
the virtual backend device path. The virtual backend device path is used to
check if a device still exists in xenstore.
Signed-off-by: Yung Giang <yung.giang@gmail.com>
Jeremy Fitzhardinge [Tue, 22 May 2007 13:48:56 +0000 (14:48 +0100)]
Implement VCPUOP_register_vcpu_info
This change implements the VCPUOP_register_vcpu_info vcpu_op. This
allows a guest to choose where each VCPU's vcpu_info structure is
placed within its address space, allowing it to put it somewhere which
is easily accessible via some per-cpu data access mechanism.
Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
kfraser@localhost.localdomain [Tue, 22 May 2007 05:43:05 +0000 (06:43 +0100)]
Merge with xen-ia64-unstable.hg
Keir Fraser [Sun, 20 May 2007 18:05:10 +0000 (19:05 +0100)]
vmxassist: Include terminating 0xff byte in TSS I/O bitmap.
Signed-off-by: Keir Fraser <keir@xensource.com>
Jake Wires [Sat, 19 May 2007 17:54:01 +0000 (10:54 -0700)]
[BLKTAP] Ensure blktap doesn't try to re-create extant sysfs entries
Signed-off-by: Jake Wires <jwires@xensource.com>
kfraser@localhost.localdomain [Fri, 18 May 2007 16:01:20 +0000 (17:01 +0100)]
Tom Wilkie [Thu, 17 May 2007 10:42:46 +0000 (11:42 +0100)]
Fix default return value for VM_Metrics.get_state
signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
Tom Wilkie [Thu, 17 May 2007 10:18:58 +0000 (11:18 +0100)]
Fix recent XenRT Failure re: xm block-list via XenAPI
signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
Ewan Mellor [Wed, 16 May 2007 22:12:16 +0000 (23:12 +0100)]
Added xeninfo.pl, a script for collecting statistics from Xen hosts using the
Xen-API. This also serves as a good example of the use of XML::RPC::Client
with the Xen-API.
By Ingard Mevåg <ingard [at] mevaag [dot] no>.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
Alex Williamson [Wed, 16 May 2007 17:38:48 +0000 (11:38 -0600)]
[IA64] Update struct checker for ia64 changes
This makes use of the union support to work with our new
vcpu_guest_context struct.
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Alex Williamson [Wed, 16 May 2007 17:37:19 +0000 (11:37 -0600)]
[IA64] Fix trivial compiler warning
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Alex Williamson [Wed, 16 May 2007 16:59:01 +0000 (10:59 -0600)]
merge with xen-unstable.hg
Alex Williamson [Wed, 16 May 2007 16:42:07 +0000 (10:42 -0600)]
[IA64] Fix deadlock of ptc.ga emulation
ptc_ga_remote_func() might be invoked by IPI with a schedule_lock
that is acquired. (e.g., inside of vcpu_migrate())
It will cause a deadlock.
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
kfraser@localhost.localdomain [Wed, 16 May 2007 08:57:29 +0000 (09:57 +0100)]
linux: Un-__init a couple of kexec vars that are accessed after init time.
Signed-off-by: Keir Fraser <keir@xensource.com>
Simon Horman [Wed, 16 May 2007 08:15:54 +0000 (09:15 +0100)]
static, __init and __initdata symbols in machine_kexec.c
Some symbols in machine_kexec.c really ought to be static and,
marked __init or __initdata.
Signed-off-by: Simon Horman <horms@verge.net.au>
Alex Williamson [Tue, 15 May 2007 21:32:23 +0000 (15:32 -0600)]
[IA64] Optimizations for windows
Windows use region 4 and region 5 for identity mapping.
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
Ian Campbell [Tue, 15 May 2007 18:00:48 +0000 (19:00 +0100)]
[XEND] Write the default ABI to the xenstore entry for each frontend
device.
This allows to run older kernels in a 32on64 mixed environment.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
Ian Campbell [Tue, 15 May 2007 16:54:48 +0000 (17:54 +0100)]
[BUILDER] Propagate the native protocol ABI for a guest out of the
domain builder and in to python code.
This knowledge will be useful to allow us to pre-seed the protocol
field in a VBD entry in xenstore which will allow us to run older
kernels in a 32on64 mixed environment.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
Tom Wilkie [Tue, 15 May 2007 16:01:57 +0000 (17:01 +0100)]
Add some fields from XenAPI docs to implementation.
Add stefan's patch to swap mtu and mac, so they're correct.
signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
kfraser@localhost.localdomain [Tue, 15 May 2007 14:14:02 +0000 (15:14 +0100)]
[HVM][SVM] Reintroduce ASIDs.
ASIDs partition the physical TLB for SVM. In the current implementation
ASIDs are used to reduce the number of TLB flushes. Each time the
guest's virtual address space changes (e.g. due to an INVLPG,
MOV-TO-{CR3, CR4} operation), instead of flushing the TLB, a new ASID is
assigned. This reduces the number of TLB flushes to at most 1/#ASIDs
(currently 1/64). The biggest advantage is that hot parts of the
hypervisor's code and data remain in the TLB.
From: Sebastian Biemueller <Sebastian.Biemueller@amd.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
kfraser@localhost.localdomain [Tue, 15 May 2007 09:50:09 +0000 (10:50 +0100)]
Fix TPM support in HVM domains
Signed-off-by: Joseph Cihula <joseph.cihula@intel.com>
Signed-off-by: Peter Yang <peisen.yang@intel.com>
kfraser@localhost.localdomain [Tue, 15 May 2007 09:49:10 +0000 (10:49 +0100)]
xenapi: Small fix to the host.get_name_description call
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
kfraser@localhost.localdomain [Tue, 15 May 2007 09:46:43 +0000 (10:46 +0100)]
x86/hvm: HVM_DBG_LOG() cleanup
- make log levels used consistent in a few places
- remove trailing newlines, dots, and commas
- remove explictly specified function names from message text
Signed-off-by: Jan Beulich <jbeulich@novell.com>
kfraser@localhost.localdomain [Tue, 15 May 2007 09:46:03 +0000 (10:46 +0100)]
vmx: remove CSTAR save/restore on VMX
CSTAR is an unused MSR in 64-bit mode on Intel's EM64T, hence there's
no need to save/restore this MSR during context switches. Mimic real
hardware by retaining the value written for eventual guest OS reads.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
kfraser@localhost.localdomain [Tue, 15 May 2007 09:43:59 +0000 (10:43 +0100)]
x86/hvm: add logging for hypercalls
Signed-off-by: Jan Beulich <jbeulich@novell.com>
kfraser@localhost.localdomain [Tue, 15 May 2007 09:43:18 +0000 (10:43 +0100)]
x86: fix EFER handling
Introduce a per-CPU shadow of what is currently in EFER, as context
switch code must re-write this MSR so that all guests run with
appropriate EFER.SCE and EFER.NX settings. Remove EFER from the set of
MSRs that VMX deals with in a generic fashion.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
kfraser@localhost.localdomain [Tue, 15 May 2007 09:28:28 +0000 (10:28 +0100)]
x86/hvm: hypercall adjustments
- share more code between 32- and 64-bit variants
- properly handle continuations for 32-bit guests on 64-bit hv
- properly handle preemption (this must *not* rely on regs->eip, as
- other code may overwrite the value there by calling
- hvm_store_cpu_guest_regs()
- deny hypercall access when called from guest in vm86 mode, which
requires that ???_guest_x86_mode() make real and vm86 modes distinguishable
Signed-off-by: Jan Beulich <jbeulich@novell.com>
kfraser@localhost.localdomain [Tue, 15 May 2007 09:13:11 +0000 (10:13 +0100)]
x86-64/hvm: pio result storing
Don't clear upper 32 bits on 8- and 16-bit PIO reads.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
kfraser@localhost.localdomain [Tue, 15 May 2007 09:12:02 +0000 (10:12 +0100)]
x86: ptwr adjustments
Make sure MFN read from pte is valid before accessing the page info
structure associated with it. Drop guest-to-machine-physical
translation from ptwr code.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
kfraser@localhost.localdomain [Tue, 15 May 2007 09:08:20 +0000 (10:08 +0100)]
x86: replace some intpte_t * casts
Don't cast values when other (type safe) mechanisms are available to =
achieve the same effect.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
kfraser@localhost.localdomain [Tue, 15 May 2007 09:03:58 +0000 (10:03 +0100)]
x86: kill unused local variable sh_mapcache
Apparently a leaf-over from pre-3.0.3.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
kfraser@localhost.localdomain [Tue, 15 May 2007 09:03:14 +0000 (10:03 +0100)]
tools: check for curl-devel and libxml2-devel
when they are required for LIBXENAPI_BINDINGS.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
kfraser@localhost.localdomain [Tue, 15 May 2007 09:01:14 +0000 (10:01 +0100)]
tools: check for libvncserver dependency libraries
Signed-off-by: Jan Beulich <jbeulich@novell.com>
kfraser@localhost.localdomain [Tue, 15 May 2007 08:59:51 +0000 (09:59 +0100)]
64-bit hvm on 32-bit dom0 - ioemu adjustments
Don't mask off data bits when running 64-bit hvm guests on 32-bit dom0.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
kfraser@localhost.localdomain [Tue, 15 May 2007 08:54:27 +0000 (09:54 +0100)]
x86: suppress SYSCALL feature for 32on64 guests
since Xen cannot handle it.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
kfraser@localhost.localdomain [Tue, 15 May 2007 08:50:36 +0000 (09:50 +0100)]
x86: invalidate_shadow_ldt() should be static
Since invalidate_shadow_ldt() depends on process_deferred_ops() to be
called, it shouldn't be visible outside xen/arch/x86/mm.c.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Alex Williamson [Mon, 14 May 2007 18:54:26 +0000 (12:54 -0600)]
[IA64] White space cleanup in regionreg.h
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Alex Williamson [Mon, 14 May 2007 17:52:01 +0000 (11:52 -0600)]
[IA64] Fix ptc.ga emulation
cset14829(
c42ae7839750) was incomplete.
The region register 0 will be clobbered as follows.
time pcpu0 pcpu1 pcpu2
| vcpu0 vcpu1 idle // assignment of vcpu
V
1.vcpu0 issues ptc.ga
2.vcpu0 sends IPI to vcpu1(pcpu1)
3.vcpu1 migrates from pcpu1 to pcpu2
4.pcpu1 receives IPI of 2 and exec ptc_ga_remote_func()
5.pcpu1 saves and modifies vrr[0]
6.vcpu1(pcpu2) modifies vrr[0]
7.pcpu1 restores vrr[0] // vrr[0] of 6 is lost
Windows will crash due to this issue.
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
Alex Williamson [Mon, 14 May 2007 17:13:24 +0000 (11:13 -0600)]
[IA64] Compilation fix with CRASH_DEBUG defined.
Update for guest_mode()
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Steven Hand [Mon, 14 May 2007 14:19:46 +0000 (15:19 +0100)]
Fix HVM save/restore after upgrade to 0.90.
Signed-off-by: Steven Hand <steven@xensource.com>
Steven Hand [Mon, 14 May 2007 14:16:32 +0000 (15:16 +0100)]
HVM save/restore: handle larger domain ids.
Signed-off-by: Steven Hand <steven@xensource.com>
Keir Fraser [Sun, 13 May 2007 09:04:34 +0000 (10:04 +0100)]
hvm qemu: Fix for masking 64-bit operands broke 32-bit operands with
32-bit qemu. Issue spotted and initial fix provided by Dexuan Cui.
Signed-off-by: Keir Fraser <keir@xensource.com>
Keir Fraser [Sat, 12 May 2007 18:22:24 +0000 (19:22 +0100)]
svm: Simplify asm stub for vmentry/vmexit.
Signed-off-by: Keir Fraser <keir@xensource.com>
Keir Fraser [Sat, 12 May 2007 18:04:35 +0000 (19:04 +0100)]
svm: Avoid VMSAVE/VMLOAD/VMSAVE/VMLOAD sequence on every vmexit/vmentry.
Instead do this only on context switches. In cases where we need
access to state that is only saved to the VMCB on VMSAVE, we track
whether the state is in sync via a per-vcpu flag and VMSAVE on demand.
The context switch code can be further improved:
1. No need to VMLOAD host state if we are switching to another SVM VCPU.
2. No need to VMSAVE host state at all (except once at start of day)
because the registers that are saved do not change (or at least, none
of the ones that matter change).
The performance is improvement is about 650 cycles for a null
hypercall. This reduces the total null-hypercall time for a non-debug
build of Xen down to around 3300 cycles on my AMD X2 system.
Signed-off-by: Keir Fraser <keir@xensource.com>
Keir Fraser [Sat, 12 May 2007 15:24:50 +0000 (16:24 +0100)]
hvm: Fix ACPI shutdown, broken by my previous changeset.
It turns out that although PIIX4 hardware defines the S5 type code to
be 000, all OSes will discover the correct code by evlauating an \_Sx
object in the ACPI DSDT. And we set the type code in that object to be
111.
So this patch keeps the other cleanups made to the piix4acpi.c file,
but switches back to checking for code 111. It also makes it clearer
in both the ioemu code and in the dsdt source code where these magic
numbers come from.
Let's hope noone actually has the true PIIX4 type codes hardcoded
(it's highly doubtful that anyone would).
Signed-off-by: Keir Fraser <keir@xensource.com>
Keir Fraser [Sat, 12 May 2007 11:46:26 +0000 (12:46 +0100)]
vmx: Replace pointless test-then-set with set.
Spotted by Eddie Dong.
Signed-off-by: Keir Fraser <keir@xensource.com>
Keir Fraser [Sat, 12 May 2007 11:44:20 +0000 (12:44 +0100)]
xend: configuration option 'localtime = 1' is not honored for PV domains.
This patch fixes an oversight when platform_* config options were
collected in a dictionary.
Signed-off-by: Jim Fehlig <jfehlig@novell.com>
Keir Fraser [Sat, 12 May 2007 11:43:16 +0000 (12:43 +0100)]
xen: Fix struct-size checker for unions and long names.
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Keir Fraser [Sat, 12 May 2007 11:41:40 +0000 (12:41 +0100)]
hvm qemu: Fix write parameter masking for 64-bit guests.
Signed-off-by: Keir Fraser <keir@xensource.com>
Keir Fraser [Sat, 12 May 2007 11:37:51 +0000 (12:37 +0100)]
xen: Better handling on not-present PDEs in destroy_xen_mappings().
Signed-off-by: Keir Fraser <keir@xensource.com>
Keir Fraser [Sat, 12 May 2007 11:07:01 +0000 (12:07 +0100)]
x86: Improve zap_low_mappings.
Do it earlier on x86/64, properly free non-superpages on x86/32, and
leave a mapping of the boot trampoline (0x90000-0xA0000) in place.
Signed-off-by: Keir Fraser <keir@xensource.com>
Keir Fraser [Sat, 12 May 2007 09:28:53 +0000 (10:28 +0100)]
xen: Free initmem after boot. Mark lots of init functions as __init
that weren't before.
Signed-off-by: Keir Fraser <keir@xensource.com>
Keir Fraser [Sat, 12 May 2007 08:48:33 +0000 (09:48 +0100)]
hvm: Fix emulation of PIIX4 PMCNTRL register for soft power-off.
The type code needs to be 000, not 111 (which is a reserved value).
Signed-off-by: Keir Fraser <keir@xensource.com>
Alex Williamson [Fri, 11 May 2007 19:15:53 +0000 (13:15 -0600)]
[IA64] get guest os type
This patch is to use GFW ACPI_OSI to identify guest OS type.
When ACPI_OSI gets OS type, it writes to a reserved port a
special val. then XEN can know the guest OS type.
NB. Linux returns true both for _OSI(linux) and _OSI(windows)
Signed-off-by: Zhang Xin <xing.z.zhang@intel.com>
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
Alex Williamson [Fri, 11 May 2007 19:09:12 +0000 (13:09 -0600)]
[IA64] Fix allocate_rid_range()
Though there is a free ridblock_owner[], allocate_rid_range()
cannot allocate it.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Alex Williamson [Fri, 11 May 2007 19:07:04 +0000 (13:07 -0600)]
[IA64] Return ENOMEM if VPD allocation failed
Usually ASSRET() is "(void)0". Therefore if VPD allocation
fails with xenheap shortage or fragmentation, NULL pointer
access occurs in vmx_final_setup_guest().
This patch fixes it.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Christian Limpach [Fri, 11 May 2007 09:07:06 +0000 (10:07 +0100)]
[qemu patches] Update patches upto changeset 15040:
090ca10cb543.
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
Christian Limpach [Fri, 11 May 2007 09:06:19 +0000 (10:06 +0100)]
[qemu] Fix ia64 after removal of ia64_intrinsic.h.
From: Alex Williamson <alex.williamson@hp.com>
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
Keir Fraser [Thu, 10 May 2007 22:49:04 +0000 (23:49 +0100)]
svm: Rationalise register synchronisation to be similar to our vmx
handling.
1. Do not copy all VMCB register state in cpu_user_regs on every
vmexit.
2. Save/restore RAX inside asm stub (in particular, before STGI on
vmexit).
3. Simplify store/load_cpu_guest_regs() hook functions to synchronise
precisely the same state as VMX.
By my measurements this reduces the round-trip latency for a null
hypercall by around 150 cycles. This is about 3% of the ~5000-cycle
total on my AMD X2 system. Not a great win, but a nice extra on top of
the code rationalisation.
Alex Williamson [Thu, 10 May 2007 21:55:22 +0000 (15:55 -0600)]
[IA64] Implement XENMEM_machine_memory_map on ia64.
This is necessary for kexec/kdump for xen/ia64. kexec-tools needs to know
real machine's memory map.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Keir Fraser [Thu, 10 May 2007 21:54:43 +0000 (22:54 +0100)]
xen: Some cleanups for x86 start of day.
1. Remove erroneous modification to e820.c
2. Make sure Xen is relocated as high as possible below 4GB.
Signed-off-by: Keir Fraser <keir@xensource.com>
Alex Williamson [Thu, 10 May 2007 21:46:30 +0000 (15:46 -0600)]
[IA64] Handle speculative vhpt walk
Since processor may support speculative VHPT walk,
The long format VHPT head entry needs to be disabled
before programming it.
Signed-off-by: Anthony Xu <anthony.xu@intel.com>
Alex Williamson [Thu, 10 May 2007 21:18:27 +0000 (15:18 -0600)]
[IA64] Quiet lookup_domain_mpa() when domain is dying.
Message clean up in lookup_domain_mpa(). It is possible that current != d.
This patch addresses xensource bugzilla #944
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Alex Williamson [Thu, 10 May 2007 19:29:33 +0000 (13:29 -0600)]
[IA64] Defined guest_mode and use it instead of user_mode.
Signed-off-by: Tristan Gingold <tgingold@free.fr>
Christian Limpach [Thu, 10 May 2007 18:35:25 +0000 (19:35 +0100)]
[qemu patches] Update patches upto changeset 15036:
dfbbb4d3b0dd.
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
--HG--
rename : tools/ioemu/patches/vnc-numpad-handling => tools/ioemu/patches/vnc-keypad-handling
Christian Limpach [Thu, 10 May 2007 18:33:05 +0000 (19:33 +0100)]
[qemu] Fix keypad handling for VNC.
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
kfraser@localhost.localdomain [Thu, 10 May 2007 17:02:55 +0000 (18:02 +0100)]
xen: Big changes to x86 start-of-day:
1. x86/64 Xen now relocates itself to physical high memory. This is
useful if we have devices that need very low memory, or if in
future we want to grant a 1:1 mapping of low physical memory to a
special 'native client domain'.
2. We now only map low 16MB RAM statically. All other RAM is mapped
dynamically within the constraints of the e820 map. It is
recommended never to map MMIO regions, and this change means that
Xen now obeys this constraint.
3. The CPU bootup trampoline is now permanently installed at
0x90000. This is necessary prereq for CPU hotplug.
4. Start-of-day asm is generally cleaned up and diff between x86/32
and x86/64 is reduced.
Signed-off-by: Keir Fraser <keir@xensource.com>
Christian Limpach [Thu, 10 May 2007 15:22:27 +0000 (16:22 +0100)]
[qemu patches] Update patches upto changeset 15032:
8f510bf078c7.
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
Christian Limpach [Thu, 10 May 2007 15:05:31 +0000 (16:05 +0100)]
[qemu patches] Update patches upto changeset 15032:
8f510bf078c7.
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
Christian Limpach [Thu, 10 May 2007 14:58:35 +0000 (15:58 +0100)]
[qemu] Remove atomic_set_bit, atomic_clear_bit and ia64_intrinsic.h and its
users.
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
Christian Limpach [Thu, 10 May 2007 14:39:28 +0000 (15:39 +0100)]
[qemu] Remove unused -timeoffset option.
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>